{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
 <!--左侧导航结束-->
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-2 connectedSortable" style=" padding-right:0px;">
          <div class="box box-solid">
            <div class="box-header with-border">            
              {%include file="ware/left.tpl.php"%}
            </div>
            <!-- /.box-body -->
         </div>
        </section>
        <!--树状图结束-->
        <section class="col-lg-10 connectedSortable">
         <div class="box box-default box-solid">
             <form name="myform" action="" method="get">
                <div class="box-header with-border">
                    <span class="fa fa-suitcase" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">{%if $folder_data.folder_name ==""%}档案管理{%else%}{%$folder_data.folder_name%}{%/if%}</p>
					{%if $folder_data.folder_name !=""%}
                    <a href="index.php?a=ware.add&folder_id={%$folder_id%}" class="btn btn-primary btn-sm" style="float:right;">当前添加</a>
					{%/if%}
					
                </div>
                <div class="box-body">
                    <div class="form-group" style="margin-bottom:15px;">
                       <a href="index.php?a=ware.list" class="btn btn-success btn-sm">全部分类</a>
					   {%foreach from=$type_lists key=key item=value%}
                       <a href="index.php?a=ware.list&type_id={%$value.type_id%}&folder_id={%$folder_id%}" class="stuff">{%$value.type_name%}</a>
                       {%/foreach%}

                    </div>
                    <div class="col-md-2 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-5 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; margin:0;">
							   标题：
						  </label>
						  <div class="input-group col-md-7 col-xs-12">
							   <input type="text" class="form-control" name="ware_title" value="{%$ware_title%}">
						  </div> 
				    </div>
					<div class="col-md-3 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-5 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; margin:0;">
							   上传人：
						  </label>
						  <div class="input-group col-md-7 col-xs-12">
							   <select class="form-control" name ="user_id">
							   <option value="0">全部</option>
							   {%foreach from=$user_lists key=key item=value%}
									  <option value="{%$value.user_id%}"{%if $value.user_id == $user_id%}selected{%/if%}>{%$value.user_name%}</option>
							   {%/foreach%}
                                </select>
						  </div> 
				    </div>
					<div class="col-md-6 col-xs-12 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-2 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; ">
							   时间：
						  </label>
						  <div class="input-group col-md-4" style="float:left;">
							   <input type="text" class="form-control" value="{%$from%}" id="from" name="from">
							     <div class="input-group-addon" style="padding:6px 7px;">
									<i class="fa fa-calendar"></i>
								 </div>
						  </div>
						  <span style="float:left;">  ~  </span >
						  <div class="input-group col-md-4" style="float:left;">
							   <input type="text" class="form-control" value="{%$to%}" id="to" name="to">
							      <div class="input-group-addon" style="padding:6px 7px;">
									 <i class="fa fa-calendar"></i>
								 </div>
						  </div>						  
				    </div>
					<div class="col-md-1 col-xs-12">
						<input type="hidden" name="a" value="ware.list">
					   <button type="submit" class="btn btn-warning">查 询</button>
					</div>
					<div style="clear:both; height:10px;"></div>
                     <table class="table table-bordered table-striped"  id="mytable">
                                <thead>
                                    <tr style="background-color:#a273ff;">
                                        <td>标题</td>
                                        <td>分类</td>
                                        <td>上传人</td>
                                        <td>上传时间</td>
										<td  width="120">操作</td>
                                    </tr>	
                                </thead>
                                <tbody>
								{%foreach from=$ware_lists key=key item=value%}
                                    <tr>
                                        <td><a href="index.php?a=ware.detail&folder_id={%$folder_id%}&ware_id={%$value.ware_id%}">{%$value.ware_title|truncate:30:"..."%}</a></td>
                                        <td>{%$value.type_name%}</td>
                                        <td>{%$value.user_name%}</td>
                                        <td>{%$value.create_time%}</td>
										<td>
                                            <a href="index.php?a=ware.detail&folder_id={%$folder_id%}&ware_id={%$value.ware_id%}" class="btn btn-success btn-xs" title="查看"><i class="fa fa-search"></i></a>
                                            <a href="index.php?a=ware.update&folder_id={%$folder_id%}&ware_id={%$value.ware_id%}" class="btn btn-warning btn-xs"  title="修改"><i class="fa fa-edit (alias)"></i></a>
                                            <a href="index.php?a=ware.del&folder_id={%$folder_id%}&ware_id={%$value.ware_id%}" onclick="if(confirm('警告！确认删除信息?')==false)return false;" class="btn btn-danger btn-xs"  title="删除"><i class="fa fa-trash"></i></a>
                                        </td>
                                    </tr>	
                                 {%/foreach%}   
                            </tbody>
                        </table>
				   </div><!--box-body -->
				   <div class="box-footer">
				   {%$page%}
				   </div>
               </form>
           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
{%include file="index.footer.tpl.php"%}
 <script>
 
  $(function() {
    $( "#from" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#to" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#to" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#from" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
</script>
